package org.example.day;

import java.util.HashSet;
import java.util.Set;

/**
 * @Description: TODO
 * @Author wyatt
 * @Data 2024/06/02 19:51
 */
public class Solution575 {

    public int distributeCandies(int[] candyType) {
        Set<Integer> type = new HashSet<>();
        for (int i : candyType) {
            type.add(i);
        }
        return Math.min(type.size(), candyType.length/2);
    }
}
